/*
@author https://yunp.top
 */

@file:JsQualifier("createjs")

package createjs

import org.w3c.dom.CanvasRenderingContext2D

open external class BitmapCache() {
    val cacheID: Int

    fun define(
        x: Int, y: Int, width: Int, height: Int,
        scale: Float = definedExternally,
        options: dynamic = definedExternally
    )

    fun draw(ctx: CanvasRenderingContext2D): Boolean
    fun getBounds(): Rectangle
    fun getCacheDataURL(): String
    fun getFilterBounds(target: DisplayObject, output: Rectangle = definedExternally): Rectangle
    fun release()
    fun update(compositeOperation: String = definedExternally)
}